package com.caoji.serach.service;

import com.caoji.serach.entity.Goods;
import com.caoji.serach.entity.SearchParamDTO;
import com.leyou.starter.elastic.entity.PageInfo;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Map;

/**
 * @Description： User: caoji
 * Date: 2020/12/13
 * Time: 10:25
 */
public interface EsService {
    /**
     * 创建索引库并设置映射
     */
    void createIndexAndMapping();

    /**
     * 加载数据到索引库
     */
    void loadData();
    Mono<List<String>> getsuggest(String key);

    Mono<PageInfo<Goods>> getkist(SearchParamDTO searchParamDTO);

    Mono<Map<String, List<?>>> getfilter(SearchParamDTO searchParamDTO);


    void saveGoodsById(Long spuId);

    void deleteGoodsById(Long spuId);
}
